//判断token是否存在
//存在正常渲染
//不存在重定向到登录页
import { getToken, isAuth } from "@/utils";
import { Navigate } from "react-router-dom";
const AuthRoute = ({ children }) => {
  return !isAuth() ? <Navigate to="/login" replace /> : <>{children}</>;
};

export { AuthRoute };
